import http from '@/utils/http';

export async function get_global_config() {
  // return await http.get("/api/globals/default");

  return await http.get('/globals/default');
}

/**
 * 更新配置项目
 * @param {*} data 
 * @returns 
 */
export async function update_global_config(data) {
  return await http.post('/globals/update', data)
}

/**
 * 单文件上传
 * @param {*} file
 * @param {*} resourceType Available values : CategoryLogo, CategoryExcel
 * @returns
 */
export async function uploadFile(file, resourceType) {
  return await http.upload('/file/upload?resourceType=' + resourceType, file);
}
